home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 February: Tool Chest / Apple Developer CD Series Tool Chest February 1996 (Apple Computer)(1996).iso / Sample Code / AOCE Sample Code / PowerTalk Access Modules / Sample SMSAM / SampleSMSAM Source / VirtualFile / VVFileMacFile.h < prev   
Encoding:
C/C++ Source or Header  |  1995-07-28  |  2.0 KB  |  71 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        VVFileMacFile.h
  3.  
  4.     Copyright:    © 1991-1994 by Apple Computer, Inc.
  5.                 All rights reserved.
  6.  
  7.     Part of the AOCE Sample SMSAM Package.  Consult the license
  8.     which came with this software for your specific legal rights.
  9.  
  10. */
  11.  
  12.  
  13.  
  14. #ifndef __VVFILEMACFILE__
  15. #define __VVFILEMACFILE__
  16.  
  17. #ifndef __VIRTUALMACFILE__
  18. #include "VirtualMacFile.h"
  19. #endif
  20.  
  21. class TVirtualFile;
  22.  
  23. /***********************************|****************************************/
  24.  
  25. class TVVFileMacFile  : public TVirtualMacFile
  26. {
  27. public:
  28.             TVVFileMacFile(const Str31 fileName);
  29.             TVVFileMacFile(TVirtualFile* dfFile,TVirtualFile* rfFile, const Str31 fileName);
  30.     virtual ~TVVFileMacFile();
  31.  
  32.     virtual OSErr                     Open ();
  33.     virtual OSErr                     Close ();
  34.  
  35.     virtual OSErr                     ReadData (void* buffer,long& count,ForkType whichFork);
  36.     virtual OSErr                     WriteData (const void* buffer, long& count, ForkType whichFork);
  37.  
  38.     virtual OSErr                     SetEnd (long logEof, ForkType whichFork);
  39.     virtual OSErr                     GetEnd (long& logEof, ForkType whichFork) const;
  40.  
  41.     virtual OSErr                     SetPosition (short posMode, long posOff, ForkType whichFork);
  42.     virtual OSErr                     GetPosition (long& filePos,ForkType whichFork) const;
  43.  
  44.     virtual OSErr                     SetFinderInfo (const FInfo& finderInfo);
  45.     virtual OSErr                     GetFinderInfo (FInfo& finderInfo) const;
  46.  
  47.     virtual OSErr                     GetDate (unsigned long& dateTime,WhichDateType whichDate) const;
  48.     virtual OSErr                     SetDate (unsigned long dateTime,WhichDateType whichDate);
  49.  
  50.     virtual void                     SetUserRef(long ref);
  51.     virtual long                     GetUserRef() const;
  52.  
  53.     virtual    OSErr                     GetSpec ( FSSpec& ) const;
  54.     virtual    OSErr                    SetSpec ( const FSSpec& );
  55.  
  56. private:    TVVFileMacFile ( const TVVFileMacFile& );
  57.             TVVFileMacFile& operator = ( const TVVFileMacFile& );
  58.  
  59.             FSSpec                    fSpec;
  60.             TVirtualFile*            fDataFile;
  61.             TVirtualFile*            fResourceFile;
  62.             FInfo                     fFinderInfo;
  63.             long                     fCreationDate;
  64.             Boolean                 fRemoveRefs;
  65.             unsigned long            fOpenCount;
  66. };
  67.  
  68. /***********************************|****************************************/
  69.  
  70. #endif    // __VVFILEMACFILE__
  71.